<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mail extends CI_Controller {



	public function index()
	{
		
		
	}
	public function contact()
	{
		$name=$this->input->post('thename',true);
		$from=$this->input->post('email',true);
		$subject=$this->input->post('subject',true);
		$message=$this->input->post('message',true);
		
		$to = "contacto@metfind.com";
		$headers = "From:" . $from;
		if(mail($to,$subject,$message,$headers))
			echo "sent";
	
		
		
	}
	public function subscribe()
	{
		$from=$this->input->post('subscribe',true);
			
		$to = "contacto@metfind.com";
		$subject = "Suscripcion";
		$message = "Suscriptor: ".$from;
		$headers = "From:" . $from;
		if(mail($to,$subject,$message,$headers))
			echo "sent";
	}
	
}